<div class="modal-header">
  <div class="modal-title"><!--{{ i.orderSn }} -->订单进度</div>
</div>
<nz-tabset>
  <nz-tab nzTitle="跟踪进度">
    <div sv-container>
      <sv-title>
        <div nz-col [nzSpan]="100" style="text-align: left; margin-left: 10px">
          <ng-container *ngIf="process_list && process_list['list'] && process_list['list'][0] && process_list['list'][0]['ID'] > 0">
            <span>最后更新人： {{ getLastUpdatorInfo().updateUser }}</span>
            <span style="margin-left: 15px">更新时间： {{ getLastUpdatorInfo().updateAt }}</span>
          </ng-container>
        </div>
        <div nz-col [nzSpan]="100" style="text-align: right; margin-right: 70px">
          <a nz-button class="mx-sm" (click)="add(i['shopId'], i['orderSn'], i['orderId'])">添加</a>
        </div>
      </sv-title>
    </div>

    <nz-space></nz-space>
    <ng-container *ngIf="process_list && process_list['list']">
      <div sv-container *ngIf="process_list && process_list['list']">
        <sv-title></sv-title>
      </div>
      <nz-table #processTable [nzData]="process_list['list']" [nzShowPagination]="false" [nzShowSizeChanger]="true">
        <thead>
          <tr>
            <th class="text-center" style="width: 190px">日期</th>
            <th class="text-center">跟踪进度</th>
            <th class="text-center" style="width: 200px">操作</th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let data of processTable.data; let i = index">
            <td class="text-center">
              <div nz-col nzMd="26" nzSm="44">
                <nz-form-control>
                  <nz-date-picker
                    [(ngModel)]="data.processDate"
                    name="dateVal"
                    style="margin-right: 24px"
                    (ngModelChange)="datePickerChange($event)"
                  ></nz-date-picker>
                </nz-form-control>
              </div>
            </td>
            <td class="text-center" style="vertical-align: middle">
              <div nz-col nzMd="26" nzSm="44">
                <nz-form-control>
                  <textarea
                    nz-input
                    [rows]="2"
                    placeholder="请输入跟踪进度"
                    name="processContent"
                    [(ngModel)]="data['processContent']"
                  ></textarea>
                </nz-form-control>
              </div>
            </td>
            <td class="text-center">
              <div nz-col [nzSpan]="24">
                <a nz-button class="mx-sm" (click)="del(i)" [disabled]="i != processTable.data.length - 1">删除</a>
              </div>
            </td>
          </tr>
        </tbody>
      </nz-table>
    </ng-container>
  </nz-tab>
</nz-tabset>

<div class="modal-footer">
  <button nz-button type="button" (click)="close()">关闭</button>
  <button nz-button type="submit" [nzType]="'primary'" (click)="save()">更新进度</button>
</div>
